/*
 * @Author: zjj
 * @Date: 2019-10-29 12:56:59
 * @LastEditors: zjj
 * @LastEditTime: 2019-11-15 09:31:37
 */
import echarts from "echarts";
export default class pieOption {
    constructor() {
        this.option = {
            title : {
                text:100,
                subtext: '总计',
                x:'center',
                y:'center',
                textStyle:{
                    fontSize:14
                }
            },
            tooltip : {
                trigger: 'item',
                formatter: "{a} <br/>{b} : {c} ({d}%)"
            },
            series : [
                {
                    name: '姓名',
                    type: 'pie',
                    radius: ['50%', '70%'],
                    label: {
                        formatter: '{b}: {@2012}'
                    },
                    data: [{name:"hhh",value:100},{name:"bbb",value:50},{name:"edfewfwefwe",value:20},{name:"fewfw",value:20}],
                    itemStyle: {
                        emphasis: {
                            shadowBlur: 10,
                            shadowOffsetX: 0,
                            shadowColor: 'rgba(0, 0, 0, 0.5)'
                        }
                    }
                }
            ]
        }
    }
    setContentData(data) {
        this.option.series[0].data = data.data
        this.option.title.text=data.total_money
    }
}